﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
  <meta name="verify-v1" content="6i/N6+rlQ/L2Ro4akvocmVo22ayXRZ2WbpdVkxtzuwM=" />
  <meta name="y_key" content="107d857063b8f9ec" />
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <meta http-equiv="Content-Style-Type" content="text/css; charset=UTF-8" />
  <meta http-equiv="keywords" content="" />
  <meta http-equiv="description" content="" />
  <link rel="shortcut icon" href="/eng/favicon.ico" />
  <link rel="start" href="/eng/index.html" title="<bean:message key="cstp100.001"/>" />
  <link rel="help" href="/eng/sitemap/index.html" title="<bean:message key="cstp100.002"/>" />
  <title><bean:message key="cstp100.000"/></title>
  <%@ include file="../common/common_css.jsp" %>
  <%@ include file="../common/common_js.jsp" %>
  <%@ include file="../common/menuLink.jsp" %>
  <script type="text/javascript" src="${f:url('/js/menu.js')}"></script>
  <script language="JavaScript">
  <!--
    // 初期表示
    function func_load(){
      // オートコンプリート無効化
      func_disabled_auto_complete();
    }

    // New Project ボタン
    function func_newProject(){
      var f = document.forms[0];
      if(f.agreementFlag.value == "0"){
        // 同意画面
        f.action = "${f:url('/csde/csde201/')}";
      }else{
        // 新規プロジェクト作成
        f.action = "${f:url('/csde/csde202/')}";
      }
      f.submit();
    }

    // プロジェクト詳細リンク
    function func_projectDetail(index){
      var f = document.forms[0];
      f.contractNumber.value = f.hiddenContractNumber[index].value;
      f.projectId.value     = f.hiddenProjectId[index].value;
      f.projectName.value   = f.hiddenProjectName[index].value;
      f.description.value   = f.hiddenDescription[index].value;
      f.action = "${f:url('/csde/csde301/')}";
      f.submit();
    }
  //-->
  </script>
</head>

<body onload="func_load();">
  <div id="screenMode">

    <div id="container">
      <a name="top" id="top"></a>

      <!-- header -->
      <%@ include file="../common/header.jsp" %>

      <div id="maincontents" class="clear">

        <div id="colLeft">

          <!-- Menu -->
          <%@ include file="../common/menu.jsp" %>

        </div><!-- colLeft -->

<s:form action="/csde/csde101" >

        <div id="colRight">

          <h1><bean:message key="csde101.001" /></h1>

          <div class="align_right">
            <input type="button" value="<bean:message key='csde101.005' />" onclick="func_newProject()" /><br/>
          </div>

          <c:if test="${projectList.size() > 0}">

          <div id="searchTable">

            <c:set var="rowCount" value="0" />
            <c:set var="workFlowCount" value="0" />
            <c:set var="oneBeforeProject" value="" />

            <table class="table">
              <colgroup>
                <col width="70px"  />
                <col width="50px" />
                <col width="50px"  />
                <c:forEach var="workFlowList" varStatus="status" items="${workFlowList}">
                  <col width="50px" />
                </c:forEach>
              </colgroup>
              <tr>
                <th class="th"><bean:message key="csde101.002" /></th>
                <th class="th"><bean:message key="csde101.003" /></th>
                <th class="th"><bean:message key="csde101.004" /></th>
                <c:forEach var="workFlowList" varStatus="status" items="${workFlowList}">
                  <th class="th"><div class="wspace" style="width:55px;">${f:h(workFlowList.value1)}</div></th>
                </c:forEach>
              </tr>
              <c:forEach var="projectList" varStatus="status" items="${projectList}">
                <c:if test="${projectList.projectId != oneBeforeProject && oneBeforeProject != ''}">
                  <c:forEach var="i" begin="${workFlowCount + 1}" end="${workFlowList.size()}">
                    <td class="${rowClass}"></td>
                  </c:forEach>
                  </tr>
                  <c:set var="workFlowCount" value="0" />
                </c:if>
                <c:if test="${projectList.projectId != oneBeforeProject}">
                  <c:set var="rowCount" value="${rowCount + 1}" />
                  <c:if test="${rowCount % 2 != 0}">
                    <c:set var="rowClass" value="td1" />
                  </c:if>
                  <c:if test="${rowCount % 2 == 0}">
                    <c:set var="rowClass" value="td2" />
                  </c:if>
                  <tr>
                    <td class="${rowClass}"><div class="wspace" style="width:70px;">${f:h(projectList.contractNumber)}</div></td>
                    <td class="${rowClass}">
                      <c:if test="${projectList.systemId2 != '2' }"><div class="wspace" style="width:50px;"><a href="javascript:void(0)" onclick="func_projectDetail('${rowCount - 1}')">${f:h(projectList.projectName)}</a></div></c:if>
                      <c:if test="${projectList.systemId2 == '2' }"><div class="wspace" style="width:50px;">${f:h(projectList.projectName)}</div></c:if>
                      <html:hidden property="hiddenContractNumber" value="${projectList.contractNumber}" />
                      <html:hidden property="hiddenProjectId"     value="${projectList.projectId}" />
                      <html:hidden property="hiddenProjectName"   value="${projectList.projectName}" />
                      <html:hidden property="hiddenDescription"   value="${projectList.description}" />
                    </td>
                    <td class="${rowClass}"><div class="wspace" style="width:50px;">${f:h(projectList.createdAt)}</div></td>
                </c:if>
                    <td class="${rowClass}"><div class="wspace" style="width:55px;">${f:h(projectList.value1)}</div></td>
                    <c:set var="workFlowCount" value="${workFlowCount + 1}" />
                    <c:set var="oneBeforeProject" value="${projectList.projectId}" />
              </c:forEach>
              <c:forEach var="i" begin="${workFlowCount + 1}" end="${workFlowList.size()}">
                 <td class="${rowClass}"></td>
              </c:forEach>
              </tr>
            </table>

          </div><!-- searchTable -->

          </c:if>

        </div><!-- colRight -->

        <div>
          <html:hidden property="contractNumber" />
          <html:hidden property="projectId" />
          <html:hidden property="projectName" />
          <html:hidden property="description" />
          <html:hidden property="hiddenContractNumber" />
          <html:hidden property="hiddenProjectId" />
          <html:hidden property="hiddenProjectName" />
          <html:hidden property="hiddenDescription" />
        </div>

        <%@ include file="../common/session.jsp" %>

</s:form>

      </div><!-- maincontents -->

      <!-- footer -->
      <%@ include file="../common/footer.jsp" %>

    </div><!-- container -->

  </div><!-- screenMode -->


</body>

</html>